package com.shuan.springboothello.controller;

import org.springframework.boot.web.servlet.error.ErrorController;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * User: lu
 * Date: 2021/12/14
 * Time: 20:28
 * Version: 1.0
 * Modified By:
 * Description:
 */
public class MyCustomErrorController implements ErrorController {

    private static final String PATH = "/error";

    @GetMapping(value=PATH)
    public String error() {
        return "Error haven";
    }

    @Override
    public String getErrorPath() {
        return null;
    }
}
